package com.seu.me.thread.factory;

/**
 * Created by liangfeihu on 2017/11/26.
 */
public class MainTest {
    public static void main(String[] args) {
        MyThreadFactory myThreadFactory = new MyThreadFactory("MyThreadFactory");
        Task task = new Task();

        Thread thread;

        System.out.println("Starting the Threads");

        for (int i = 0; i < 10; i++) {
            thread = myThreadFactory.newThread(task);
            thread.start();
        }

        System.out.println("Factory stats:");
        System.out.println(myThreadFactory.getStats());
    }
}
